package com.glsc.ngateway.common.base.repo.mysql.gateway.ldap;

import com.glsc.ngateway.common.base.domain.mysql.gateway.ldap.DepartmentVisitSystem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface LdapDepartmentSystemRepo extends JpaRepository<DepartmentVisitSystem, Integer>, JpaSpecificationExecutor<DepartmentVisitSystem> {


    List<DepartmentVisitSystem> findAllByDepartment(String department);

    List<DepartmentVisitSystem> findAllByDepartmentAndComptitle(String department, String companyName);

    DepartmentVisitSystem findOneByDepartmentAndComptitle(String department, String comptitle);

    DepartmentVisitSystem findOneByDepartmentAndComptitleIsNull(String department);
}
